using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class RessourcesEffect : Effect {
	
	
	// Properties
	//
	
	public int MagicModifier = 0;
	public int RocksModifier = 0;
	public int BeastModifier = 0;
	public int GemsModifier = 0;
	public int MinesModifier = 0;
	public int DungeonsModifier = 0;
	
	public List<Player> Targets;
	
	// Method
	//
	
	public override void ApplyEffect(){
		
		// For each target players, apply the ressources modifiers
		foreach (Player p in this.Targets){
			
			p.Magic += this.MagicModifier;
			p.Rocks += this.RocksModifier;
			p.Beast += this.BeastModifier;
			p.Gems += this.GemsModifier;
			p.Mines += this.MinesModifier;
			p.Dungeons += this.DungeonsModifier;
						
			p.CheckNegativeRessources();
			
		}		
		
	}
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
